<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ include file="/common/include/includeHeader.jsp"%>
<table width="100%" height="100%">
    <tr><td align="center" valign="middle">
<!-- -------------------------------------------- -->

<%
    List sysLangList = MemObjFactory.getSysLanguageList(sessionLocale);
    pageContext.setAttribute("sysLangList",sysLangList);
    
    List countryList = MemObjFactory.getAllCountryList(sessionLocale);
    pageContext.setAttribute("countryList",countryList);
%>

	<script language="javascript" type="text/javascript">
	
		function submitform(pressbutton){
			//document.adminForm.task.value=pressbutton;
			try {
				document.adminForm.onsubmit();
				}
			catch(e){}
			document.adminForm.submit();
		}
	
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			// do field validation
			if (form.username.value == ""){
				alert( "username could not be empty." );
			} else if (form.password.value == ""){
				alert( "please give a password" );
			} else if (form.password.value != form.password2.value){
				alert( "please reinput the same password" );
			} else {
				submitform( pressbutton );
			}
		}
	</script> 

<form action="/module/community/member/member.do?CMD=add" method="post" name="adminForm">
<!-- <form action="/module/common/register/registerMember.do?CMD=registerCompany" method=post> -->
<table width="80%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left"><bean:message key="regmember.01"/></td>
      </tr>
    </table>
      <br>
      <table width="80%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="30" align="left" valign="top" class="notice">
          <mytag:MyActionMsg /></td>
        </tr>
      </table>      
      <table width="80%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td colspan="2" class="su01"><bean:message key="regmember.02"/></td>
        </tr>
        <tr>
          <td colspan="2" class="su02"><bean:message key="regmember.03"/></td>
        </tr>
        <tr class="su03">
          <td>* <bean:message key="base.15"/></td>
          <td><input name="username" type="text" size="20"> <input type="submit" 

name="Submit" value="<bean:message key="base.25" />"><bean:message key="base.31"/></td>
        </tr>
        <tr class="su03">
          <td>* <bean:message key="base.29"/></td>
          <td><input name="password" type="text" size="20"></td>
        </tr>
        <tr class="su03">
          <td>* <bean:message key="base.30"/></td>
          <td><input name="password2" type="text" size="20"></td>
        </tr>
        <tr class="su03">
          <td>* <bean:message key="base.07"/></td>
          <td><input name="email" type="text" size="40">
          <input type="submit" name="Submit" value="<bean:message key="base.27"/>"></td>
        </tr>
		<tr>
          <td colspan="2" class="su03">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2" class="su02"><bean:message key="regmember.04"/></td>
        </tr>
        <tr class="su03">
          <td>* <bean:message key="base.32"/></td>
          <td><input type="radio" name="sex" value="1" checked><bean:message key="base.33"/>
          	<input type="radio" name="sex" value="0"><bean:message key="base.34"/></td>
        </tr>
        <tr class="su03">
          <td>* <bean:message key="base.16"/></td>
          <td><mytag:select name="country" notEmpty="true" 
                  value="<%= sessionLocale.toString() %>" listName="countryList"/></td>
        </tr>
        <tr class="su03">
          <td>&nbsp;&nbsp;<bean:message key="base.21"/></td>
          <td><input name="city" type="text" size="10"></td>
        </tr>
        <tr class="su03">
          <td>&nbsp;&nbsp;<bean:message key="base.35"/></td>
          <td><select name="bir_year">
            <option value="1991" selected>1991
              <option value="77">1990
              <option value="106">1949
              </select>
            <select name="bir_month">
              <option value="1" selected>01
              <option value="77">02
              <option value="106">12
            </select>
            <select name="bir_day" >
              <option value="1" selected>01
              <option value="77">02
              <option value="106">31
          </select></td>
        </tr>
        <tr class="su03">
          <td>* <bean:message key="base.17"/></td>
          <td><mytag:select name="sysLanguage" notEmpty="true" 
                  value="<%= sessionLocale.toString() %>" listName="sysLangList"/></td>
        </tr>
        <tr class="su03">
          <td>* <bean:message key="base.18"/></td>
          <td><mytag:select name="practLanguage" listName="sysLangList"/></td>
        </tr>
        <tr class="su03">
          <td>&nbsp;&nbsp;<bean:message key="regmember.05" /></td>
          <td><textarea name="introduce" cols="60" rows="6"></textarea></td>
        </tr>
        <tr class="su03">
          <td>&nbsp;</td>
          <td height="30"><input type="checkbox" name="checkbox" value="checkbox">
            <a href="agreement.htm" target="_blank"><bean:message key="base.36" /></a></td>
        </tr>
        <tr align="center" valign="bottom">
          <td height="60" colspan="2"><input type="submit" name="Submit" value="<bean:message key="base.24" />"></td>
        </tr>
        <tr align="center" valign="bottom">
          <td height="60" colspan="2"><a href="#" onclick="submitbutton(this)">submit</a></td>
        </tr>


      </table>
</td></tr></table>